﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<EPPLib.Data.ContactDataObject>>" %>

<asp:Content ID="mainContent" ContentPlaceHolderID="mainContentPlaceholder" runat="server">
    <h2>Contatti</h2>
    <table>
        <tr>
            <th>
                Codice
            </th>
            <th>
                Nome e cognome
            </th>
            <th>
                Società
            </th>
            <th>
                Indirizzo
            </th>
            <th>
                Città
            </th>
            <th>
                Provincia
            </th>
            <th>
                C.A.P.
            </th>
            <th>
                Nazione
            </th>
            <th>
                Telefono
            </th>
            <th>
                Fax
            </th>
            <th>
                Email
            </th>
            <th>
                AuthInfo
            </th>
            <th>
                Autorizzazione dati
            </th>
            <th>
                Nazionalità
            </th>
            <th>
                Tipo
            </th>
            <th>
                Codice fiscale/P.IVA
            </th>
            <th>
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: item.ID %>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Organization %>
            </td>
            <td>
                <%: item.Street1 %> <%: item.Street2 %> <%: item.Street3 %>
            </td>
            <td>
                <%: item.City %>
            </td>
            <td class="center">
                <%: item.District %>
            </td>
            <td class="center">
                <%: item.PostalCode %>
            </td>
            <td class="center">
                <%: item.CountryCode %>
            </td>
            <td>
                <%: item.PhonePrefix %> <%: item.Phone %> <%: item.PhoneInternal %>
            </td>
            <td>
                <%: item.FaxPrefix %> <%: item.Fax %> <%: item.FaxInternal %>
            </td>
            <td>
                <a href="mailto:<%: item.Email %>"><%: item.Email %></a>
            </td>
            <td class="center">
                <%: item.AuthInfo %>
            </td>
            <td class="center">
                <%: (bool)item.ConsentForPublishing ? "Si" : "No" %>
            </td>
            <td class="center">
                <%: item.NationalityCode %>
            </td>
            <td class="center">
                <%: item.EntityTypeDescription %>
            </td>
            <td>
                <%: item.RegCode %>
            </td>
            <td>
                <a href="<%: Url.Action("Details", new { userID = item.InternalID }) %>"><img src="/Content/Images/detail.png" alt="Dettagli" /></a>
                <a href="<%: Url.Action("Edit", new { userID = item.InternalID }) %>"><img src="/Content/Images/edit.png" alt="Modifica" /></a>
                <a href="<%: Url.Action("Delete", new { userID = item.ID }) %>"><img src="/Content/Images/delete.png" alt="Elimina" /></a>
                <a href="<%: Url.Action("Info", new { userID = item.ID }) %>"><img src="/Content/Images/update.png" alt="Aggiorna" /></a>
            </td>
        </tr>
    
    <% } %>

    </table>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="titleContentPlaceholder" runat="server">
</asp:Content>

